<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>合租体</title>
<script type="text/javascript" src="/js/jquery-1.6.1.min.js"></script>
<link href="/css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="blueBar"></div>
<div class="globalContainer clearfix">
<%@include file="/include/header.jsp" %>
  <div class="mainContainer">
    <div class="rightCol">
    <div class="right_top">
       <span class="button on"><a class="btn-b" href="/user/userinfo.jspa?t=info">个人信息</a></span>
       <span class="button "><a class="btn-b" href="/user/userinfo.jspa?t=headpic">修改头像</a></span>
       <span class="button "><a class="btn-b" href="/user/userinfo.jspa?t=password">修改密码</a></span>
    </div>
      <div>
      <!--右侧内容区域开始 -->
        <div class="rightBody">
        <div class="user-info">
            <dl class="mt5 clearfix">
              <dd><form action="/user/edit_userinfo.jspa?t=info" method="post">
            <table width="100%" cellspacing="0" cellpadding="0" border="0" class="t-info">
            <tbody>
            <tr>
              <td class="w03">用户名：</td>
              <td colspan="2"><%=userName %></td>
            </tr>
            <tr>
              <td>性别：</td>
              <td colspan="2"> 
                <label><input type="radio" name="user.gender" value="0" <%=sex==0?"checked='checked'":"" %>>男&nbsp;&nbsp;&nbsp;&nbsp;</label>
                <label><input type="radio" name="user.gender" value="1" <%=sex==1?"checked='checked'":"" %>>女&nbsp;&nbsp;&nbsp;&nbsp;</label>
                <span style="width:136px" id="tip_gender"></span></td>
            </tr>
            <tr>
              <td>生日：</td>
              <td colspan="2">
              <input type="text" name="user.birthday" id="id_birthday" value="<%=birthday %>" />
              </td>
              </tr>
            <tr>
              <td>邮箱：</td>
              <td colspan="2">
              <input type="text" class="txt_input" id="email" name="user.email" <%=hasProvEmail?"disabled=\"disabled\"":"" %> value="<%=email %>">
              </td>
             </tr>
            <tr>
              <td></td>
              <%if(hasProvEmail) {%>
              <td> <span class="fc-aaa">邮箱已验证</span></td>
              <td width="398"><a onclick="return getemail('c')" href="#">更换邮箱&gt;&gt;</a></td>
              <%}else{ %>
			<td width="165"><span class="fc-aaa">邮箱未验证</span> <a  href="javascript:getemail('v');">立即验证&gt;&gt;</a></td>
              <td width="398"><span class="fc-aaa">验证邮箱,方便他人联系你</span></td>              
              <%} %>
              
             </tr>
            <script>
            function getphone(me){
                //var phone = document.getElementById('phone').value;
               // location.href='/vip/account/phone_approve.php?phone=' + phone;
               //alert(document.getElementById('phone').disabled);
              // alert(me);
               if(document.getElementById('phone').disabled==true){
                document.getElementById('phone').disabled="";
               }else{
            	   document.getElementById('phone').disabled="disabled";
                   }
            }
            function getemail(o){
                //var email = document.getElementById('email').value;
                //location.href='/vip/account/email_approve.php?email=' + email;
                if(o=="c"){
                	document.getElementById('email').disabled="";
                }else if(o=="v"){
                	$.ajax({
                		   type: "get",
                		   url: "/user/provInfo.jspa",
                		   data: "t=email",
                		   dataType: "text",
                		   success: function(msg){
                		     alert(msg);
                		   }
                		});

                    }
            }
            </script>
            <tr>
              <td>手机号码：</td>
              <td colspan="2"><input type="text" class="txt_input" id="phone" name="user.mobile" value="<%=mobile %>" <%=hasProvMobile?"disabled='disabled'":"" %>><span id="tip_phone"></span></td>
             </tr>
            <tr>
              <td></td>
              <%if(hasProvMobile){ %>
              <td> <span class="fc-aaa">手机已验证</span></td>
              <td width="398"><a onclick="return getphone()" href="#">更换手机号&gt;&gt;</a></td>
            	<%}else{ %>
               <td width="165"><span class="fc-aaa">手机未验证</span> <a onclick="return getphone()" href="#">立即验证&gt;&gt;</a></td>
              <td width="398"><span class="fc-aaa">手机验证,方便他人联系你</span></td>
            	
            	<%} %>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td colspan="2"></td>
              </tr>
            <tr>
              <td></td>
              <td colspan="2"><input type="submit" class="submit" id="sub" value="完成修改"></td>
              </tr>
          </tbody></table></form>
              </dd>
            </dl>
          </div>
        </div>
      </div>
    </div>
  <%@include file="/include/left.jsp" %> 
  </div>
  <%@include file="/include/footer.jsp" %>
</div>
</body>
</html>
